package com.globalwave.common.virtualmoduletemplate
{
	
	import mx.binding.utils.BindingUtils;
	import mx.controls.dataGridClasses.DataGridColumn;
	import mx.core.ClassFactory;
	
	[Event(name="headerClick", type="com.globalwave.common.event.CommonEvent")]
	
	public class VirtualDataGridColumn extends DataGridColumn
	{
		public function VirtualDataGridColumn(field:XML, columnName:String=null)
		{
			super(columnName);
			//this.headerText = {field.name_} ;
			//BindingUtils.bindProperty(rect,"height",this,"height"); 
			this.field = field ;
			this.dataField = field.code_;
			this.headerRenderer = new ClassFactory(com.globalwave.common.virtualmoduletemplate.HeadClickRenderer) ;
			this.visible = true ;
			BindingUtils.bindSetter(setterFunc, field, "name_");
		}
		[Bindable]
		public var field:XML ;

		private function setterFunc(str:String):void {
			this.headerText = str;
		}
		
		public var headClickRenderer:HeadClickRenderer ;
	}
}